package cn.xz.mxxz.adapter

import android.graphics.Color
import android.widget.TextView
import cn.xz.mxxz.R
import cn.xz.mxxz.bean.AreaList
import cn.xz.mxxz.bean.DreamTitle
import cn.xz.mxxz.util.AppHelper
import cn.xz.mxxz.widgets.XZTextView
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder

/**
 *梦想印记类别适配器*/
class DreamTAdapter: BaseQuickAdapter<DreamTitle, BaseViewHolder>(R.layout.item_dream_t) {

    override fun convert(holder: BaseViewHolder, item: DreamTitle) {

        val tvTxt = holder.getView<TextView>(R.id.tv_txt)

        tvTxt.text = item.dictLabel

        var mD = AppHelper.getDrawable(R.drawable.bg_1890ff_5)
        var mC = "#FFFFFF"
        if (!item.select){
           mD = null
            mC = "#000000"
        }

        tvTxt.setTextColor(Color.parseColor(mC))
        holder.itemView.background = mD
    }
}